function rect(left,right,bottom,up)
    return function(x,y) 
        return left <= x and x <= right
            and bottom <= y and y  <= up
    end
end